<ul class="products">
    <?php
        $args = array( 'post_type' => 'product', 'posts_per_page' => 1, 'product_cat' => $pageslug, 'orderby' => 'rand', 'meta_key' => 'featuredproduct', 'meta_value' => 'catfeatured' );
        $featuredproduct = new WP_Query( $args );
        while ( $featuredproduct->have_posts() ) : $featuredproduct->the_post(); global $product; ?>

            <li class="product">    

                    <a href="<?php echo get_permalink( $loop->post->ID ) ?>" title="<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>">

                        <?php woocommerce_show_product_sale_flash( $post, $product ); ?>

                        <?php if (get_field('productFeaturedImage') != '') { ?>
                            <img src="<?php the_field('productFeaturedImage'); ?>" alt="<?php the_title(); ?>" />
                        <?php } elseif (has_post_thumbnail( $loop->post->ID )) { ?>
                            <?php echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog'); ?>
                        <?php } else { ?>
                            <?php echo '<img src="'.woocommerce_placeholder_img_src().'" alt="Placeholder" width="300px" height="300px" />'; ?>
                        <?php } ?>
                            
                        <h3><?php the_title(); ?></h3>

                        <span class="price"><?php echo $product->get_price_html(); ?></span>                    

                    </a>

                    <?php woocommerce_template_loop_add_to_cart( $loop->post, $product ); ?>

                </li>

    <?php endwhile; ?>
    <?php wp_reset_query(); ?>
</ul><!--/.products-->
